import request from '@/utils/request'

// 获取文章分类
export const getArticleChannelService = () => request.get('/my/cate/list')

// 添加文章分类
export const addArticleChannelService = (data) => request.post('/my/cate/add', data)

// 编辑文章分类
export const editArticleChannelService = (data) => request.put('/my/cate/info', data)

// 删除文章分类
export const delArticleChannelService = (id) => request.delete('/my/cate/del', { params: { id } })

// 获取文章列表
export const getArticleListService = (params) => request.get('/my/article/list', { params })

// 发布文章
export const publishArticleService = (data) => request.post('/my/article/add', data)

// 获取文章详情
export const getArticleDetailService = (id) => request.get('/my/article/info', { params: { id } })

// 编辑文章
export const editArticleService = (data) => request.put('/my/article/info', data)

// 删除文章
export const delArticleService = (id) => request.delete('my/article/info', { params: { id } })
